package com.force;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class root extends Activity {
	
	private Button NewFoodBtn;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        //get button object by calling from XML file
        NewFoodBtn = (Button)findViewById(R.id.new_food);
        
//        Button launch = (Button)findViewById(R.id.launchActivity);
        NewFoodBtn.setOnClickListener(new Button.OnClickListener(){
        	public void onClick(View v) {
        		// TODO Auto-generated method stub
        		Intent intent = new Intent(root.this, AddFood.class); // 두번째 액티비티를 실행하기 위한 인텐트
        		startActivity(intent); // 두번째 액티비티를 실행합니다.
        	}
         
        });
        //watch for button click
//        NewFoodBtn.setOnClickListener(new Button.eventGoListener() {
//        	public void onClick(View v){
//        		Intent	intent	= new	Intent(Activity.class, AddFood.AddFood);
//        		startActivityForResult(intent, 1); // Sub_Activity 호출
//        	}
//        });
    }
}